<?php
class User_model extends CI_Model
{
	function __construct(){
		parent::__construct();
	}
	function checklogin($username,$password)
	{
		$this->db->where('username',$username);
		$this->db->where('password',$password);
		$query = $this->db->get('user');
		return $query->row();
	}
	function changepass($username,$password){
		$data['password'] = $password;
		$this->db->where('username',$username);
		$this->db->update('user',$data);
	}
}
